package cn.kgc.ebookdemo02.controller;

import cn.kgc.ebookdemo02.entity.ResultEntity;
import cn.kgc.ebookdemo02.pojo.EbookCategory;
import cn.kgc.ebookdemo02.service.EbookCategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-19 14:38
 */
@RestController
public class CategoryController {

    @Resource
    EbookCategoryService ebookCategoryService;
    @RequestMapping("/getCategoryList")
    public ResultEntity<List<EbookCategory>> getCategoryList(){
        List<EbookCategory> categoryList=ebookCategoryService.selectAll();
        return ResultEntity.successWithoutData(categoryList);
    }
}
